package him.action.board;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import him.action.Action;
import him.action.ActionForward;
import him.dto.bbs.NoticeDTO;
import him.service.NoticeBoardService;
import him.serviceimple.NoticeBoardServiceImple;

public class NoticeListAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		
		ActionForward actforward = new ActionForward();
		NoticeBoardService service = NoticeBoardServiceImple.getInstance();
		
		List<NoticeDTO> list = service.getNoticeTitleList();
		System.out.println("list"+list);
		
		request.setAttribute("noticelist", list);
		actforward.setUrl("noticelist");
		
		return actforward;
	}

}
